FROM php:5.6-fpm
COPY sources.list /etc/apt/sources.list


ENV PHPREDIS_VERSION 4.0.2
ENV PHPMONGODB_VERSION 1.4.3
ENV PHPAMQP_VERSION 1.7.1
ENV PHPSWOOLE_VERSION 4.0.3
ENV PHPMEMCACHED_VERSION 3.0.4 
ENV RABBITMQC_VERSION 0.8.0

RUN apt-get update \
    && apt-get install -y git apt-utils wget libfreetype6-dev libjpeg62-turbo-dev libpng-dev pkg-config build-essential libmemcached-dev libssl-dev \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install gd \
    && :\
    && apt-get install -y libicu-dev \
    && docker-php-ext-install intl \
    && :\
    && apt-get install -y libxml2-dev \
    && apt-get install -y libxslt-dev \ 
    && apt-get install -y libbz2-dev \
    && docker-php-ext-install bz2 \
    && :\
    && docker-php-ext-install zip \
    && docker-php-ext-install pcntl \
    && docker-php-ext-install pdo_mysql \
    && docker-php-ext-install mysql \
    && docker-php-ext-install mysqli \
    && docker-php-ext-install mbstring \
 
    && echo "Cleaning..." \
    && apt-get purge -y --auto-remove \
        -o APT::AutoRemove::RecommendsImportant=false \
        -o APT::AutoRemove::SuggestsImportant=false \
        $buildDeps \
    && rm -rf /var/cache/apt/* \
    && rm -rf /var/lib/apt/lists/*